/*****************************************************************************************/
/* ECSE 426 - Microprocessor - Fall 2009
/* Lab Experiment 3 - Header for UART.C
/* UART.H
/* @author: Danny Wu - 260238209 - B.Comp.Eng
/* @author: Han-Sheng Chin - 260209715 - B.Elec.Eng
/* @version: 09.10.23.1508 
/****************************************************************************************/

void main(void);                            //main method
void initRsUART(void);                      //initiate the UART for RS232
void initSpiUART(void);                     //initialize the UART for the SPI
void spiWriteReg(char addr, char value);    //writes data to the SPI
char spiReadReg(char addr);                 //reads data to the SPI

//print functions
void putChar(char text);            //put char in the hyper terminal
void print(char* text);             //print a string of char
void println(char* text);           //print a string of char beginning with \n
void printHex(char text);           //takes a char and displays it as an HEX 
void clearScreen(void);             //clear screen

//helper method for the UART
char getRndChar(void);                                      //generate random char
int charToHex(char *input);                                 //converts a char input into a hex number
char combineInput(char firstInput, char secondInput);       //to convert 2 Hex into 1 Hex representation
void wait(int microseconds);                                //enters a for loop and create a wait

//helper method for CC2500
void ccResetChip(void);             //uses the ccCommandStrobe to send SRES
void ccCommandStrobe(char strobe);  //send a command to see which strobe to execute
void ccRX(void);                    //print every char buffer
void ccTX(char* msg);               //print every char buffer
void ccPrintState(void);            //print the current value in MARCSTATE - DEBUG
void ccPowerUp(void);
void ccConfigBeacon(void);          //config CC2500 to listen to beacon

